"""
from Tkinter import *

master = Tk()

var = StringVar(master)
var.set("one") # initial value

option = OptionMenu(master, var, "one", "two", "three", "four")
option.pack()

#
# test stuff

def ok():
    print "value is", var.get()
    master.quit()

button = Button(master, text="OK", command=ok)
button.pack()

mainloop()"""


from Tkinter import *
import webbrowser as wb

# the constructor syntax is:
# OptionMenu(master, variable, *values)

def gotoURL():
	URL = 'http://www.google.com'
	wb.open_new(URL)

	return




OPTIONS = [
    "egg",
    "bunny",
    "chicken"
]

master = Tk()
master.wm_resizable(FALSE, FALSE)

master.title("test widget")
master.geometry("200x200+500+500")


variable = StringVar(master)
variable.set(OPTIONS[0]) # default value

w = apply(OptionMenu, (master, variable) + tuple(OPTIONS))
w.pack()

b = Button ( master, text = "open google", command = gotoURL)
b.pack(side = LEFT)



t = Text(None, height = 20, width = 10)

t.pack()



mainloop()